You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 19, 2019. It is now read-only.
This PR uses a span as the wrapping element instead of a div. This makes it possible to use the component inside of elements which prohibit the usage of block-elements as children like paragraphs.
Example:
<p><Autocomplete {/*...*/} /></p>
Prodcues the error <div> cannot appear as a descendant of <p>. See ... > Autocomplete > div.
Tests are not adjusted, I will add them tomorrow.
flash1293
changed the title
use span instead of div for wrapper-element
WIP: use span instead of div for wrapper-element
Feb 8, 2018
Hi Johannes! I think I'd rather wait for something like #298 instead of changing the root node type, as this will likely cause problems for people who rely on the rapper being a <div>. If you feel like having an attempt at implementing the that suggestion it would be greatly appreciated.
Fair enough - what about a new prop renderWrapper analogous to renderInput and renderMenu?
It would be a function with the parameters wrapperProps, wrapperStyle, renderedInput and renderedMenu, default is something like
Sounds good! I wonder if maybe we should rather pass in renderInput and renderMenu in addition to isOpen, so you have full control over what you want to render.
@CMTegner I added the renderWrapper prop. I'm not sure what you mean by full control. With open, renderMenu, renderInput and now renderWrapper, the user should be in complete control of the render-output.
flash1293
changed the title
WIP: use span instead of div for wrapper-element
Make wrapper-element ocnfigurable
Feb 25, 2018
flash1293
changed the title
Make wrapper-element ocnfigurable
Make wrapper-element configurable
Feb 25, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR uses a span as the wrapping element instead of a div. This makes it possible to use the component inside of elements which prohibit the usage of block-elements as children like paragraphs.
Example:
Prodcues the error
<div> cannot appear as a descendant of <p>. See ... > Autocomplete > div.Tests are not adjusted, I will add them tomorrow.